import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/studentManage'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/adminManage',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/AdminTable.vue'),
                    meta: { title: '管理员管理' }
                },
                {
                    path: '/studentManage',
                    name: 'studentManage',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/StudentTable.vue'),
                    meta: { title: '学生管理' }
                },
                {
                    path: '/acaManage',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/AcaTable.vue'),
                    meta: { title: '学院管理' }
                },
                {
                    path: '/classManage',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/ClassTable.vue'),
                    meta: { title: '班级管理' },
                    //启用参数传递
                    props:true
                },


            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
    ]
});
